<?php
header("Cache-Control: no-cache, must-revalidate");    
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header('Content-type: application/javascript');
//header('Content-type: text/css');
$fp = stream_socket_client("127.0.0.1:666", $errno, $errstr) or die("Could not create
socket\n");

//$_SERVER['CLASSIV_CON] = $fp

if (!$fp) {
    echo "ERROR: $errno - $errstr<br />\n";
} else {
    socket_set_blocking($fp,false);
    stream_set_timeout($fp,0,1000);
    fputs($fp, "hello server!!!\n\n");
    $bytes_left = socket_get_status($fp);
    //echo $bytes_left.len;//["unread_bytes"]; 
    if ($bytes_left > 0) {
      //$result["results"] = fread($fp, $bytes_left[unread_bytes]);
    }
    else {
      $result["results"] = "";
    }
    stream_socket_shutdown($fp, STREAM_SHUT_RDWR);
    //fclose($fp);
}
$key = $_COOKIE["classIVusertoken"];  
//$key = $_GET["t"];
print("alert(\"$key\")");
?>
